<template>
  <div>
      <h1>v-on练习</h1>
      <p>你的金钱:{{num}}</p>
      <button @click='fn'>过520</button>
      <button @click='fn1'>板砖</button>
  </div>
</template>

<script>
export default {
data() {
    return {
        num:1000
    }
},
methods: {
fn() {
     this.num -=520
    },
    fn1() {
        this.num +=100
    }
}
}
</script>

<style>

</style>